home *** CD-ROM | disk | FTP | other *** search
Wrap
/*******************************/ /* Image Engineer Macro script */ /* by Simon Edwards */ /* 3/6/95 */ /* */ /* This creates a sort of spin */ /* motion blur effect. */ /*******************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit PROJECT_INFO arg(1) WIDTH sourcewidth=RESULT PROJECT_INFO arg(1) HEIGHT sourceheight=RESULT 'REQUEST "Number of degrees to blur by" "1|2|4|8|16"' reply=RESULT if reply=0 then times=4 else times=reply-1 'REQUEST "Step size to use" "1|0.5|0.25|0.125"' reply=RESULT select when reply=1 then degrees=1 when reply=2 then do degrees=0.5 times=times+1 end when reply=3 then do degrees=0.25 times=times+2 end when reply=0 then do degrees=0.125 times=times+3 end end 'REQUEST "Method to use" "Blur|Max|Min"' reply=RESULT select when reply=1 then method="MIX 50" when reply=2 then method="MAX" when reply=0 then method="MIN" end ROTATE arg(1) degrees BEST temp=RESULT PROJECT_INFO temp WIDTH tempwidth=RESULT PROJECT_INFO temp HEIGHT tempheight=RESULT MARK temp PRIMARY MARK arg(1) SECONDARY COMPOSITE (sourcewidth-tempwidth)/2 (sourceheight-tempheight)/2 method temp2=RESULT CLOSE temp degrees=degrees*2 do while times~=0 ROTATE temp2 degrees BEST temp=RESULT PROJECT_INFO temp WIDTH tempwidth=RESULT PROJECT_INFO temp HEIGHT tempheight=RESULT MARK temp PRIMARY MARK temp2 SECONDARY COMPOSITE (sourcewidth-tempwidth)/2 (sourceheight-tempheight)/2 method temp3=RESULT CLOSE temp2 CLOSE temp temp2=temp3 degrees=degrees*2 times=times-1 end exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end